const isDev = process.env.NODE_ENV === 'development';
const extConfig = uni.getExtConfigSync ? uni.getExtConfigSync() : {};
try {
  if (!extConfig.appVersion) {
    extConfig.appVersion = wx.getAccountInfoSync().miniProgram.version || '2.0.1';
  }
} catch (e) {
  console.warn(e);
}
const config = {
  isDev,
  isOpen: true, // 第三方开发
  serviceApi: 'https://testwsx.hzwsa.com/api',
  nodeApi: 'https://nodeapi.madaomall.com',
  appVersion: '2.0.0',
  static: 'https://cdn.itaored.com/static/fed/wxapp/assets',
  userInfoName: 'storage-user-info', // 本地缓存用户信息key名称
  tokenName: 'storage-token', // 本地缓存token key名称
  LOG: isDev, // dev环境打印log
  appId: 'wx82d0721b65404dba',
  appName: '多多来宝惠购',
  finderUserName: 'sphzFpq9WYNArNh', // 视频号id
  project: 'ddlbhg',
  srAppId: 'bibc8e9078fa2b4144',
  // 和气SAAS所需要的全局店铺ID
  storeId: null,
  // rsa 公钥
  publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCilxGqpINzC4exfq9C52ubHoFGUtm2uVT/g9VF8LKYUX52ewR1D0CcIZcci9HM3mcjDke2YFnYdQ93Nka/+sTP0yig5LUXV+P4OpjjgVNxeUIEL7OCPzXvJQpKemC0ea7eWL6UoCNWwuXuvIHrKvNsTQwK54YSQxgpL2Mb7RAH+QIDAQAB',
  // 公司主体
  companyName: '杭州桃红网络有限公司',
  headImg: 'https://alicdn.madaomall.com/test/feima-uploaded/images/6a/d9/6ad92add437edbbd9f23555936a69578.jpg?x-oss-process=image/resize,w_640/quality,q_85/format,webp',
  ptBusinessId: 7,
  appletType: 1
};
console.log('extConfig-> ', extConfig);

module.exports = Object.assign(config, extConfig);
